package javacommon.util;

import java.util.Collection;
public class Tools {
	private Tools(){}
	
	/**
	 * 判断 string collection对象是否为空
	 * @param obj
	 * @return
	 */
	@SuppressWarnings("unchecked")
	public static Boolean isNotNull(Object obj) {
		Boolean flag = false;
		if(obj != null) {
			if(obj instanceof String) {
				String o = (String)obj;
				if(!"".equals(o.trim())) flag = true;
			} else if(obj instanceof Collection) {
				Collection o = (Collection)obj;
				if(!o.isEmpty()) flag = true;
			}
		} 
		return flag;
	}
	
	
}
